/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package towerdefense.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.swing.AbstractListModel;
import towerdefense.data.Creep;

/**
 *
 * @author stefan
 */
public class Wave extends AbstractListModel<Creep> implements Iterable<Creep> {

    private List<Creep> creeps = new ArrayList<>();
    private int interval;

    public void add(Creep c) {
        creeps.add(c);
    }

    @Override
    public int getSize() {
        return creeps.size();
    }

    @Override
    public Creep getElementAt(int index) {
        return creeps.get(index);
    }

    @Override
    public Iterator<Creep> iterator() {
        return creeps.iterator();
    }
}
